Fontes de Consulta
Returns provided by each of the sources for asynchronous queries by Netrin. You can request access to these sources through suporte@netrin.com.br
Regularidade do CPF
Definition
The CPF regularity query allows validating a CPF (Brazilian individual taxpayer identification number) according to the requested parameters. Initially, the query is executed in our offline database, which contains the most recent data for this CPF, periodically consulted or updated by our algorithms. It's important to note that these data aim to cover over 99% of the information in relation to the official data from the original source, in this case, the Federal Revenue Service (Receita Federal). However, inconsistencies may occur between the data in our database and the official source, especially regarding the CPF's registration status or a death record not yet captured by our algorithms or a recent query.
In any case, when making a request for a CPF query, immediately after the API returns the data from our offline database, an online search will be performed on the official source (Federal Revenue Service) to confirm or deny the information, with an average time of 10 seconds*. If an inconsistency is identified, an email will be sent to the configured email address with the details of the discrepancy. For information that doesn't present inconsistencies, no notice or email will be issued.
We inform you that this average time of 10 seconds may vary according to the availability and performance of responses from the websites and applications of the Federal Revenue Service. All requests in the asynchronous query are queued for online checking at the Federal Revenue Service.
If the Federal Revenue Service website or application is offline, they will be evaluated as soon as they return to normal operation. In these cases, any emails with inconsistency alerts may take longer to arrive. We also clarify that Netrin constantly monitors the availability of these websites and applications and has a specific section in the client portal to demonstrate this availability. Additionally, specific communications will be sent in cases of prolonged unavailability.
If the user wishes to perform a synchronous data confirmation, where the return will be based on the actual information found in the Federal Revenue Service in an online manner, it is possible to specify the input parameter "comprovante-sincrono=true." In this case, the query will become synchronous, requiring waiting for the total processing time. If this parameter is not specified, the default "false" will be assumed.
In both cases, a link with the address to the confirmation of the query will be provided immediately. In the case of an asynchronous query, it may take up to 10 seconds after the return for the confirmation file to be physically available at the address.
For instance, an asynchronous query that returns the information in 0.5 seconds may take up to 10 seconds* for the confirmation to be available at the indicated URL.
Request
Service URL: https://regularidade-cpf.netrin.com.br/v1/
Parameters | Description |
---|---|
token | Access token |
cpf | CPF of the person to be queried |
comprovante-sincrono | *If you wish to receive the service synchronously, set the parameter as "comprovante-sincrono=true" |
Note: The comprovante-sincrono parameter is optional.
Example: https://regularidade-cpf.netrin.com.br/v1/?token=0000&cpf=0000
Response
{
"cpf": "00000000000",
"regularidadeCpf": {
"cpf": "00000000000",
"nome": "FULANO",
"primeiroNome": "FULANO",
"sobrenome": "FULANO",
"situacaoCadastral": "REGULAR",
"paisOrigem": "BRAZIL",
"idade": "20",
"nomeMae": "FULANA",
"genero": "M",
"digitoVerificador": "00",
"comprovante": "",
"dataNascimento": "10/08/2000",
"dataInscricao": "10/08/2000",
"anoObito": "",
"dataAtualizacao": "2023-08-14T05:47:03.092866",
"urlComprovante": ""
}
}
- Exception Return
API exceptions can be found on the definitions page, on the side tab.
Click here to go to the API Definitions.
- JSON Return Details
Key | Type | Description | Values |
---|---|---|---|
cpf | string | Number of CPF | - |
nome | string | Name associated with CPF | - |
primeiroNome | string | First name associated with CPF | - |
sobrenome | string | Last name associated with CPF | - |
situacaoCadastral | string | CPF registration status | REGULAR / SUSPENSA / TITULAR FALECIDO / PENDENTE DE REGULARIZAÇÃO / CANCELADA / NULA |
paisOrigem | string | Country of origin associated with CPF | - |
idade | int | Age associated with CPF | - |
nomeMae | string | Mother's name associated with CPF | - |
genero | string | Gender associated with CPF | M = Male / F = Female / U = Undefined |
digitoVerificador | string | CPF verification digit | - |
comprovante | string | Federal Revenue Confirmation Code | - |
dataNascimento | string | Date of birth associated with CPF in the format DD/MM/YYYY | - |
dataInscricao | string | Date of CPF registration in the format DD/MM/YYYY | When the returned CPF has been registered before 1990, the phrase "anterior a" will be added before the date |
anoObito | string | Year of death associated with CPF in the format YYYY | - |
dataAtualizacao | string | Date indicating the last data update for this CPF in the Federal Revenue records, in the format AAAA-MM-DD HH:MM:SS | - |
urlComprovante | link | URL for downloading the consultation voucher | - |
Confirmation
Accessing the query confirmation via the URL can result in four situations:
- Viewing the confirmation as issued by the Federal Revenue.
- Message: “Temporariamente indisponível, tente novamente mais tarde” in case of temporary technical unavailability.
{
"message": "Temporariamente indisponível, tente novamente mais tarde",
}
- Message: "Arquivo não disponível", when the file is not located in our system (such as broken or incorrect links).
{
"message": "Arquivo não disponível",
}
- Message: "Arquivo Expirado", when the validity or storage period has already elapsed.
{
"message": "Arquivo Expirado",
}
Data Validation (Callback)
In addition to email notifications, it is also possible to retrieve documents that have discrepancies through a query at the endpoint https://regularidade-cpf.netrin.com.br/v1/divergencias?token= In this endpoint, all documents that had different information compared to the initial search in the offline database will be listed, comparing them with the second query to the Federal Revenue Service.
The return will only include discrepancies that have not been read yet. In other words, in the second call, discrepancies that were previously included in the return will no longer be there, only new ones, if any. In the "divergences_unread_total" tag, you will be able to check the total number of unread discrepancies that need to be updated. The "asyncReturn" tag will provide the return obtained from the offline database, and the "receitaFederalReturn" tag will contain the official return from the Federal Revenue Service, as well as the most up-to-date data from the source.
It is equally important to check the "urlComprovante" tag, which will contain the most recent confirmation of the query and should be stored internally.
Service URL: https://regularidade-cpf.netrin.com.br/v1/divergencias?token=
Parameters | Description |
---|---|
token | Token de acesso |
Example: https://regularidade-cpf.netrin.com.br/v1/divergencias?token=0000000
Response
{
"divergences_unread_total":2,
"divergences_current":2,
"divergencias":[
{
"cpf":"000",
"nome":"NOME",
"dataNascimento":"01/01/2000",
"asyncReturn":{
"situacaoCadastral":"REGULAR",
"dataInscricao":"01/01/2000",
"digitoVerificador":"00",
"anoObito":""
},
"receitaFederalReturn":{
"situacaoCadastral":"PENDENTE DE REGULARIZAÇÃO",
"dataInscricao":"01/01/2000",
"digitoVerificador":"04",
"anoObito":""
},
"consultation_date":"2023-08-25T00:00:00.000000",
"notified_divergent_time":"5.686521",
"urlComprovante":""
},
{
"cpf":"0000",
"nome":"NOME",
"dataNascimento":"09/09/1999",
"asyncReturn":{
"situacaoCadastral":"PENDENTE DE REGULARIZAÇÃO",
"dataInscricao":"06/08/2002",
"digitoVerificador":"00",
"anoObito":""
},
"receitaFederalReturn":{
"situacaoCadastral":"REGULAR",
"dataInscricao":"06/08/2002",
"digitoVerificador":"00",
"anoObito":""
},
"consultation_date":"2023-08-25T00:00:00.000000",
"notified_divergent_time":"5.686521",
"urlComprovante":""
}
]
}
Data Validation (Webhook)
The webhook service is also available for you to automatically receive JSON returns of divergent data, without the need to keep querying the callback endpoint. To use this feature, simply create an open URL in your infrastructure and notify the support team (suporte@netrin.com.br) that you would like to receive divergence information through the webhook via this link.
Unlike callback information, which stores everything in a single response and delivers an array with multiple divergences, the webhook option queues divergences individually and delivers them one by one. It will only be considered delivered to the client when the open URL responds with a status code 200.
It is equally important to check the "urlComprovante" tag, which will contain the most recent proof of the query and should be stored internally
Response
{
"divergences_unread_total":1,
"divergences_current":1,
"divergencias":[
{
"cpf":"000",
"nome":"NOME",
"dataNascimento":"01/01/2000",
"asyncReturn":{
"situacaoCadastral":"REGULAR",
"dataInscricao":"01/01/2000",
"digitoVerificador":"00",
"anoObito":""
},
"receitaFederalReturn":{
"situacaoCadastral":"PENDENTE DE REGULARIZAÇÃO",
"dataInscricao":"01/01/2000",
"digitoVerificador":"04",
"anoObito":""
},
"consultation_date":"2023-08-25T00:00:00.000000",
"notified_divergent_time":"5.686521",
"urlComprovante":""
}
]
}